import {
	resolve
} from "path";
import {
	getSiteConf
} from "@/api/api.js"

export const site = {
	data() {
		return {
			socketTask: null,
			siteConf: {},
			roleConf: {},
			staffRole1: []
		}
	},
	mounted() {
		console.log('局部');
		// getSiteConf().then(res => {
		// 	if (res.code == 0) {
		// 		let conf = res.data.conf
		// 		if (conf.logo) {
		// 			conf.logo = conf.logo.path
		// 		} else {
		// 			conf.logo = '/static/index/head.png'
		// 		}
		// 		this.siteConf = conf
		// 		this.roleConf = res.data.roleConf
		// 		this.staffRole1 = res.data.staffRole
		// 		console.log('局部mix', this.staffRole1);
		// 	}
		// });

	},
	methods: {
		getSite() {
			getSiteConf().then(res => {
				if (res.code == 0) {
					let conf = res.data.conf
					if (conf.logo) {
						conf.logo = conf.logo.path
					} else {
						conf.logo = '/static/index/head.png'
					}

				}
			});
		}
	}
}